Repository navigation
Pin the console representation after adding or removing locations - #86
Merged
dmccoystephenson merged 1 commit intoNov 20, 2026
Conversation
printConsoleRepresentation walks getLocations() and breaks rows every getSize() locations, so removeLocation shifts later locations back a slot and addLocation's location is printed last, whatever its coordinates. A characterization test pins both, and the README now says so alongside the existing setSize note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (anchor: CI run 44667861092, the Library tests job printed Test 90 Success under both the make build and the AddressSanitizer build; Strata frontend and Web build also green):
Judgment note: README.md:58 says an added location is printed after the existing ones whatever its coordinates. Whether it begins a new row depends on how many locations precede it, so the README deliberately does not say "on a row of its own". The test only pins the fresh-grid case, where it does. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
dmccoystephenson
deleted the
feature/pin-console-representation-after-location-changes
branch
November 20, 2026 03:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Environment::printConsoleRepresentation()after the grid's location vector changes. Only a fresh grid andGrid::setSizewere covered before.Grid::removeLocationon a 2x2 grid, every later location shifts back one slot, so the occupied(0, 1)is printed on the first row:"[ ] [x] \n[ ] \n".Grid::addLocationof a location at(5, 5), that location is printed after the generated four, on a row of its own:"[ ] [ ] \n[ ] [ ] \n[x] \n".setSizenote is widened to state that the printout followsgetLocations()order and ignores coordinates, so it also misaligns afterremoveLocationandaddLocation.No production code is changed. This is a Stage B cycle (test expansion). No open issues existed at triage, so none were skipped and none are closed. A Stage A sweep of
docs/STRATA.mdwas done first and found no drift: the CMake minimum, the v0.7.0 pin, emsdk 6.0.11, the 16x10 golden blocks, the snap rule, the bench timing, the 12 fps fallback and the four site files were all checked against source.Test plan
Library tests (make + CMake)runsrun_tests.shandrun_tests_asan.shgreen, with Test 90 printing Success. Local compilation and execution are denied in this sandbox, so CI is the anchor.Environment::printConsoleRepresentation,Grid::removeLocation,Grid::addLocationandGrid::addEntityToLocation.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson